iconhelper: clear the surface on invalidation
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 3 Aug 2013 16:03:52 +0000 (18:03 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Sat, 3 Aug 2013 16:08:33 +0000 (18:08 +0200)
This was missed during the pixbuf->surface conversion, so when the state
changed we were not recreating a new surface for it.

gtk/gtkiconhelper.c

index a159f06d683f101a4f9622a34b0955085487f367..d753198277e8545c9ef953322ede2610d04c7c69 100644 (file)
@@ -100,6 +100,11 @@ void
 _gtk_icon_helper_invalidate (GtkIconHelper *self)
 {
   g_clear_object (&self->priv->rendered_pixbuf);
+  if (self->priv->rendered_surface != NULL)
+    {
+      cairo_surface_destroy (self->priv->rendered_surface);
+      self->priv->rendered_surface = NULL;
+    }
 }
 
 void